Towards safe and efficient functional reactive programming

نویسنده

  • Neil Sculthorpe
چکیده

Functional Reactive Programming (FRP) is an approach to reactive programming where systems are structured as networks of functions operating on time-varying values (signals). FRP is based on the synchronous data-flow paradigm and supports both continuous-time and discretetime signals (hybrid systems). What sets FRP apart from most other reactive languages is its support for systems with highly dynamic structure (dynamism) and higher-order reactive constructs (higher-order data-flow). However, the price paid for these features has been the loss of the safety and performance guarantees provided by other, less expressive, reactive languages. Statically guaranteeing safety properties of programs is an attractive proposition. This is true in particular for typical application domains for reactive programming such as embedded systems. To that end, many existing reactive languages have type systems or other static checks that guarantee domain-specific constraints, such as feedback being well-formed (causality analysis). However, compared with FRP, they are limited in their capacity to support dynamism and higher-order data-flow. On the other hand, as established static techniques do not suffice for highly structurally dynamic systems, FRP generally enforces few domain-specific constraints, leaving the FRP programmer to manually check that the constraints are respected. Thus, there is currently a trade-off between static guarantees and dynamism among reactive languages. This thesis contributes towards advancing the safety and efficiency of FRP by studying highly structurally dynamic networks of functions operating on mixed (yet distinct) continuoustime and discrete-time signals. First, an ideal denotational semantics is defined for this kind of FRP, along with a type system that captures domain-specific constraints. The correctness and practicality of the language and type system are then demonstrated by proof of concept implementations in Agda and Haskell. Finally, temporal properties of signals and of functions on signals are expressed using techniques from temporal logic, as motivation and justification for a range of optimisations.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Simple and Efficient Higher-Order Reactive Programming

Functional reactive programming (FRP) is an elegant approach to declaratively specify reactive systems. However, the powerful abstractions of FRP have historically made it difficult to predict and control the resource usage of programs written in this style. In this paper we give a simple type theory for higher-order functional reactive programming, as well as a natural implementation strategy ...

متن کامل

Specifying Behavior in C++

Most robot programming takes place in the “time domain.” That is, the goal is to specify the behavior of a system that is acquiring a continual temporal stream of inputs, and is required to provide a continual, temporal stream of outputs. We present a reactive programming language, based on the Functional Reactive Programming paradigm, for specifying such behavior. The major attributes of this ...

متن کامل

Simulation of metabolism-based herb-drug interaction: towards safe and efficacious use of NIPRD-AM1

Objective: To evaluate the effect of NIPRD-AM1 on CYP3A4 in order to generate clinically significant data for its safe and efficacious use. Materials and Methods: NIPRD-AM1 is a phytomedicine developed from aqueous root extracts of Nauclea latifolia Smith (Rubiaceae) for the treatment of uncomplicated malaria. The effect of NIPRD-AM1 on CYP3A4 was measured with and without the addition of NIPRD...

متن کامل

Towards a Common Categorical Semantics for Linear-Time Temporal Logic and Functional Reactive Programming

Linear-time temporal logic (LTL) and functional reactive programming (FRP) are related via a Curry–Howard correspondence. Based on this observation, we develop a common categorical semantics for a subset of LTL and its corresponding flavor of FRP. We devise a class of categorical models, called fan categories, that explicitly reflect the notion of time-dependent trueness of temporal proposition...

متن کامل

Towards Reactive Functional Logic Programming Languages

In this paper we present a new extension of functional logic programming languages which allows to specify, at a very high level, applications that need parallelism and reactivity with the environment. For that, we introduce the possibility of deening procedures (agents) which specify the dynamics (evolution) of a classical functional logic program, including its communication with the environm...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011